<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css" crossorigin="anonymous">
    <title>登录</title>
</head>


<body>
<!-- 头部 -->
<header class="bg-dark sticky-top" th:fragment="index-header">
    <div class="container">
        <!-- 导航 -->
        <nav class="navbar navbars-expand-lg navbar-dark">
            <!-- logo -->
            <a class="navbar-brand" href="#"></a>
            <li class="nav-item ml-3 btn-group-vertical">
                <br/>
            </li>
        </nav>
    </div>
</header>

<!-- 登录框 -->
<div class="container">
    <div class="row">
        <div class="col-md-6 offset-md-3">
            <!-- 登录表单 -->
            <br/>
            <form action="/user/doLogin">
                <h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
                <!-- 用户名和密码 -->
                <label class="sr-only">Username</label>
                <input type="text" class="form-control" id="username" name="username" placeholder="Username" required="" autofocus="">
                <br/>
                <label class="sr-only">Password</label>
                <input type="password" class="form-control" id="password" name="password" placeholder="Password" required="">
                <br/>
                <!-- 身份选择 -->
                <div class="form-check form-check-inline mb-3">
                    <input class="form-check-input" type="radio" name="identity" id="adminRadio" value="1" checked>
                    <label class="form-check-label" for="adminRadio">Admin</label>
                </div>
                <div class="form-check form-check-inline mb-3">
                    <input class="form-check-input" type="radio" name="identity" id="studentRadio" value="0">
                    <label class="form-check-label" for="studentRadio">Student</label>
                </div>
                <!-- 登录按钮 -->
                <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
            </form>
        </div>
    </div>
</div>


<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" crossorigin="anonymous"></script>


<!--结尾-->
<script>


    $(function (){
        var message='[[${message}]]';
        if(message!=''&&message!=null&&message!=undefined){
            alert(message);
        }

    });

</script>

</body>

</html>